/*@Author S.Genikhov*
  Creation Date 8/06/2010
  Last modifed 8/06/2010
  @Brief Implementation of dinamical Array-Vector*/

#ifndef __VECTOR___INCLUDED
#define __VECTOR___INCLUDED

#define   IN
#define OUT

enum  Vec_errors
{
VEC_All_IS_O_K                   =0,
VEC_IMPOSSIBLE_ALLOCATE_NEW_ARRAY=1,
VEC_OUT_OF_BOUND_Get             =10,
VEC_NOT_ACCEPT_VECTOR_Add        =20,
VEC_NOT_ACCEPT_DATA_Get          =30,
VEC_EMPTY_ARRAY_NOTHING_TO_DELETE=40,
VEC_DATA_NOT_FITTED_Get          =50,
VEC_NOT_ACCEPT_VECTOR_Get        =60,
VEC_NOT_ACCEPT_DATA_Set          =70,
VEC_NOT_ACCEPT_VECTOR_Set        =80,
VEC_WRONG_DELET_ACTION           =90,
VEC_OUT_OF_BOUND_Set             =95
};
typedef enum Vec_errors Vec_errors;

typedef struct Vector Vec_t;

/**function returns pointer to Struct Vec or NULL as an error*/
Vec_t* Vector_Creat();
/**function return 0 if o.k and value 1-100 if not succeded*/
Vec_errors Vector_Add(Vec_t* vec1,void* data);
/*Vector instert by index*/
Vec_errors Vector_Add_by_index(Vec_t* _vec1,void* _data,int _index);
/********************************************************************************/
Vec_errors Vector_Get(Vec_t* vec1,OUT void** data,int index);
/***function set the data memeber according to proveded index to provaded value.
If ok return 0*/
Vec_errors Vector_Set(Vec_t* _vec1,void* data, int index);
/***function return pointer to Struct vec or NULL*/
Vec_t* Vector_Creat();
/******************************************************************************8*/
Vec_errors Vector_Delete(Vec_t* vec,int index);
/****************************************************************************/
void Vector_Destroy(Vec_t* vec);
#endif /* __VECTOR___INCLUDED*/
